namespace SharpGraphT.Event;

public class GraphEdgeChangeEventArgs<TV, TE> : GraphEdgeChangeEventArgs
    where TE : class, new() {
    private static readonly long SerialVersionUid = -4421610303769803253L;

    protected TE edge;

    protected TV edgeSource;

    protected TV edgeTarget;

    protected double edgeWeight;

    public GraphEdgeChangeEventArgs(int type, TE edge, TV edgeSource,
        TV edgeTarget, double edgeWeight) : base(type) {
        this.edge = edge;
        this.edgeSource = edgeSource;
        this.edgeTarget = edgeTarget;
        this.edgeWeight = edgeWeight;
    }

    public TE Edge => edge;

    public TV EdgeSource => edgeSource;

    public TV EdgeTarget => edgeTarget;

    public double EdgeWeight => edgeWeight;
}

public class GraphEdgeChangeEventArgs : GraphChangeEventArgs {
    public static readonly int BeforeEdgeAdded = 21;
    public static readonly int BeforeEdgeRemoved = 22;
    public static readonly int EdgeAdded = 23;
    public static readonly int EdgeRemoved = 24;
    public static readonly int EdgeWeightUpdated = 25;
    public GraphEdgeChangeEventArgs(int type) : base(type) { }
}